home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / LORD2B6.ZIP / 3RDPARTY.DOC < prev    next >
Text File  |  1997-04-27  |  10KB  |  255 lines

  1.  
  2.               THIRD PARTY DOCUMENTATION FOR THE LORD2 ENGINE
  3.  
  4. This is some extra info and help on creating addons/new areas/stand alone
  5. .refs/new worlds for the LORD2 engine.
  6.  
  7. My goal is to make it easy and free (besides our cheap $15 registration
  8. fee) for any non programmer to make his own door or world.
  9.  
  10. ** The pascal structures of most data files are listed at the end of this **
  11. ** file.                                                                  **
  12.  
  13. Q:  How do I start adding screens from a clear map?
  14.  
  15. A:  Delete the files WORLD.DAT and MAP.DAT.
  16.  
  17. Q:  If I make my own world, what do I need to distribute it?
  18.  
  19. A: MAP.DAT, WORLD.DAT and all your .REF files.  Probably a good idea to
  20.    also throw in a file_id.diz and a .doc file of some sort.
  21.  
  22.    To install it, a person should setup a NEW game of LORD2 somewhere, then
  23.    copy your files over it.  Otherwise it would destroy the real LORD2 game
  24.    they were running.  Be sure to make this clear in your documentation.
  25.  
  26.    Do *NOT* distirbute the GAME.DAT file.  This is where non game
  27.    information is held like their registration info (they probably don't
  28.    want this overwritten!) and ticks per second, etc.
  29.  
  30. Q: You made LORD2 and my game needs it to run - does this mean I cannot
  31.    charge people for it?
  32.  
  33. A: Charge away, I don't want any royalities, you might thank me in your
  34.    docs though. ;>  Since there is no way to compile or protect your work,
  35.    I doubt many will charge for addons which is fine by me.
  36.  
  37.    A situation that would make charging feasible is say, if you have one
  38.    full world addon, and for $5 you would send them two more.  This worked
  39.    with new LORD ansi packs for a few people, and so much more than new
  40.    ANSI can be done now.
  41.  
  42. Q: I'm editting some stuff in LORD2 - How do I know what vars you used for
  43.    what?
  44.  
  45. A: Check the GAMETXT.REF file - at the top I list every var I am using and
  46.    tell you what it is for.  Any addon you make should contain a list like
  47.    this somewhere.
  48.  
  49. Q: I made my own game using your system - but it says LORDII: New World at
  50.    the bottom of the screen!! How tacky!
  51.  
  52. A: You can change this.  As well as the default <more> prompt.  Check
  53.    REFHELP.DOC to learn about the @PROGNAME and @MOREMAP commands.
  54.  
  55. Q: How on earth could I make an ADDON for LORD2, something they plug into
  56.    their current game like an IGM?
  57.  
  58. A: This would be very difficult.  I suspect entirely new worlds/games will
  59.    be more popular, and easier to install.
  60.  
  61.    One possibility is make a .REF file that does not change any vars
  62.    except ones marked 'temp vars for math' and saves to DISK anything it
  63.    needs - Then telling the SYSOP that *HE* needs to make a building and
  64.    hotspot and add it to the map manually.
  65.  
  66.    But it would be ugly.. So hacking two worlds up to make one is for pros
  67.    only.
  68.  
  69. Q: Do I have to use your realtime movement/messaging system?
  70.  
  71. A: No.  Download my addon BRADYREF.ZIP from my website and check it out - it
  72.    demonstrates how you can run a single .REF file for the game instead of
  73.    using the full on system.  For .REF's like these, it is possible to run
  74.    them FROM the LORD2 dir, and not disrupt LORD2's real data files, in
  75.    case the sysop also has a LORD2 game running their.
  76.  
  77.    It looks like this:  LORD2 crap+crap.ref <other parms here>.  This is
  78.    good for testing specific .ref files also.  "crap" is the label to
  79.    run, and "crap.ref" is the filename.
  80.  
  81.    When LORD2 is run this way, it behaves a little differently - for one, it
  82.    quits the game as soon as the .ref is done.  Also, you cannot use the
  83.    built in load/save player data.
  84.  
  85.    If you NEEDED this, but didn't want to use the mapping system at all, you
  86.    still can.  You would edit the @#STARTGAME function to start your main
  87.    .REF game, then do a @halt to stop the game before it moves on to the
  88.    mapping system.
  89.  
  90. -= Summary =-
  91.  
  92. In any case - *IF* you are using the mapping engine in your game, be sure
  93. to tell the user in the docs if a registered LORD2 is required so they
  94. don't think your .ref is buggy if things go wrong.
  95.  
  96. They need a registered LORD2 if:
  97.  
  98.  * You use maps that are not in the unregistered area.  This kinda tricky -
  99.    but basically all the maps you can access in the very first part of the
  100.    game up to until you pass Neb are part of the unregistered area.
  101.  
  102.  * You use more than 20 items in the items system.  If they pickup/buy an
  103.    item pass 20, it will show up as blank, and will not be useable.
  104.  
  105. Please send your finishes addons/games over to me to check out, I'll put the
  106. best ones/ones that work on my web page for download!
  107.  
  108. Just email attach them mime or uue to sethable@rtsoft.com.
  109.  
  110. If you have questions and need help with .REF's please feel free to email
  111. me for help and suggestions, but even in LORD2's beta form I am getting
  112. .REF's sent to me every day to diagnose problems and such and I can see
  113. I won't be able to do this for everyone... <G>
  114.  
  115. But I'll do what I can!
  116.  
  117. Also:  I'll probably have LORD2 ref/world download area on my website soon,
  118. as well as a developers area.  So hit www.rtsoft.com once in a while to
  119. see what is new there!
  120.  
  121. -Seth (sethable@rtsoft.com)
  122.  
  123. -=-=-= Record formats for the map.dat, world.dat and trader.dat files =-=-
  124.  
  125. I got a few people wanting to make their own player/screen editors for
  126. L2, this is fine with me.  As promised here is the record format in
  127. Pascal:
  128.  
  129.   type world_info = record {For the world.dat file -  this is kind of
  130.   the index for the MAP.REF file.  It tells LORD2 how each screen hooks
  131.   to each other.  loc is each screen - starting at x1,y1 is 1, then this
  132.   goes right until 80 is reached, then starts at x1,y2 for 81 etc.}
  133.   name: string[60];
  134.   loc: array[1..1600] of integer; {holds the physical map # of the
  135.   record for this screen from the MAP.DAT file.. If # is 0, there is
  136.   no screen here. }
  137.   v: array[1..40] of longint; {used by `v}
  138.   s: array[1..10] of string[80]; {used by `s}
  139.   time: longint; {year+month+day?.. not sure can't remember}
  140.   show: array[1..1600] of byte; {show up on the players auto 'map'?}
  141.   extra: array[1..396] of char; {extra for me}
  142.   end;
  143.  
  144.  
  145.   type all_players = record
  146.   p: array[1..200] of all_p;
  147.   end;
  148.  
  149.  
  150.   type user_rec = record
  151.    name : string[25]; {handle they choose for LORD2}
  152.    real_names: string[40]; {name from BBS}
  153.    gold,bank,exp: longint; {exp isn't used but reserved}
  154.    last_day_on,love: integer; {love isn't used but reserved}
  155.    wep,arm: shortint; {item # of wep/arm they have equipped}
  156.    race: string[30]; {reserved}
  157.    sex_male: integer; {1 if male.. yes there is a reason I didn't use
  158.                        a byte!! <G> }
  159.    on_now,battle: byte; {these will be OFF when a player is offline}
  160.    dead,busy,deleted,nice,map,e6: integer;
  161.    {If dead, dead is 1, if deleted, deleted is 1.  Map is map block #.}
  162.    x,y: integer; {current cordinates of player}
  163.    item: array[1..99] of integer; {items.  used by `i}
  164.    p: array[1..99] of longint;  {longints.  used by `i}
  165.    b: array[1..99] of byte;  {bytes.  Used by `t}
  166.    last_saved: longint; {last day saved}
  167.    last_day_played: longint; {duh}
  168.    lmap: integer; {last map player was on that was 'visable'}
  169.    extra: array[1..354] of char; {reserved for me}
  170.    end;
  171.  
  172.  
  173. {The update.tmp file is made up of this record, one for each player
  174. in order.  Just in case you wanted to write an ap that needed to know
  175. what was going on realtime.}
  176.  
  177.         type q_update = record
  178.     x,y: shortint;
  179.     map: integer;
  180.     on_now: byte;
  181.     busy: byte;   {these are all 0 or 1 if true}
  182.     battle: byte;
  183.     end;
  184.  
  185.  
  186.  
  187.  
  188.  
  189.     type item_struct = record  {used by item.ref}
  190.     name: string[30]; {name of item}
  191.     action: string[40];  {string for hitting someone with it}
  192.     use_once,armour,weapon,sell,used: boolean;
  193.     value: longint;   {gold value}
  194.     breakage: integer;  {break percentage per use}
  195.     max_buy: integer;  {unused for now}
  196.     def,strength: integer;  {strength/defence added if equipped}
  197.     eat: integer;    {unused for now}
  198.     ref: string[12]; {label of .ref procedure in ITEMS.REF}
  199.     use_action: string[30]; {text for using it with the .ref}
  200.     descrip: string[30]; {description of item that shows to the right}
  201.     drop: boolean; {if true, item cannot be dropped, it is a quest item}
  202.     extra: array[1..37] of char;  {reserved}
  203.     end;
  204.  
  205.     type item_rec = record {the entire ITEMS.DAT file is ONE of this
  206.     record format}
  207.     i: array[1..99] of item_struct;
  208.     end;
  209.  
  210.  
  211.     type map_info = record {used by plan_rec, which is for each
  212.                             screen}
  213.     fc: shortint; {foreground color of square}
  214.     bc: shortint; {background color of square}
  215.     c: char; {actual char}
  216.     t: integer; {can't remember}
  217.     s: shortint; {what type so it knows if you can walk through it or
  218.     not.. here is the list:
  219.  
  220. if map^.w[x,y].s = 0 then ter := 'Unpassable';
  221. if map^.w[x,y].s = 1 then ter := 'Grass';
  222. if map^.w[x,y].s = 2 then ter := 'Rocky';
  223. if map^.w[x,y].s = 3 then ter := 'Water';
  224. if map^.w[x,y].s = 4 then ter := 'Ocean';
  225. if map^.w[x,y].s = 5 then ter := 'Forest';   }
  226.  
  227.     end;
  228.  
  229.  
  230.     type special_struct = record {also used by plan_rec, the ten
  231. hotspots available all use this format}
  232.     move_place: integer; {map to move to, 0 if not a warp}
  233.     dx,dy: shortint; {xy cords of hotspot, 0 if hotspot not used}
  234.     x,y: shortint;  {xy cords of warp destination, 0 if not a warp}
  235.     refname: string[12]; {label of ref procedure to run, if not a warp}
  236.     reffile: string[12]; {filename of .ref to run if not a warp}
  237.     extra: array[1..100] of char; {reserved by me}
  238.     end;
  239.  
  240.  
  241.     type plan_rec = record {record for the MAP.DAT file, which is
  242.     screen info}
  243.    name: string[30]; {name of screen}
  244.    w: array[1..80] of array[1..20] of map_info; {each block on screen}
  245.    special: array[1..10] of special_struct; {the 10 hotspots}
  246.    battle_odds: longint; {odds of running the 'screen random ref'}
  247.    batfile: string[12]; {ref file name}
  248.    batname: string[12]; {label of ref procedure}
  249.    safe: boolean; {true if players cannot fight on this screen}
  250.    extra: array[1..469] of char; {reserved by me}
  251.    end;
  252.  
  253.  
  254.  
  255.